package com.bra.ui.adapter;

import java.util.List;

import com.bra.R;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
/**
 * 场馆详情界面的 推荐 adapter
 * @author lenovo
 *
 */
public class VenueDetails_Recommend_adapter extends BaseAdapter {
	private Context context;
	private  String[] items;
	private LayoutInflater mInflater;

	public VenueDetails_Recommend_adapter(Context context,  String[] items) {
		this.context = context;
		this.items = items;
		mInflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return items.length;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return items[position];
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder;
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = mInflater.inflate(R.layout.venuedetails_recommend_item, null);			
			holder.cgxq_tj_text = (TextView) convertView.findViewById(R.id.cgxq_tj_text);										
			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}
		holder.cgxq_tj_text.setText(items[position]);
	
		
		return convertView;
	}

	public class ViewHolder {		
		private TextView cgxq_tj_text;		
	}

}
